package com.yang.service;

import com.yang.entity.Orderdetail;
import com.yang.dao.OrderdetailDao;

import java.util.*;

public class OrderdetailService {
    private final OrderdetailDao orderdetailDao = new OrderdetailDao();

    //查询全部
    public List<Orderdetail> queryOrderdetail() {
        return orderdetailDao.queryOrderdetail();
    }

    //单个查询
    public Orderdetail queryOrderdetailById(Integer id) {
        return orderdetailDao.queryOrderdetailById(id);
    }

    //添加
    public int saveOrderdetail(Orderdetail obj) {
        return orderdetailDao.saveOrderdetail(obj);
    }

    //删除
    public int deleteOrderdetailById(Integer id) {
        return orderdetailDao.deleteOrderdetailById(id);
    }

    //修改
    public int updateOrderdetailById(Orderdetail obj) {
        return orderdetailDao.updateOrderdetailById(obj);
    }
}
